﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="Admin_QL_QUANG_CAO.aspx.cs" Inherits="Admin_Admin_QL_SACH" %>

<asp:Content ID="Content1" ContentPlaceHolderID="NoiDung" Runat="Server">
    <div>
        <asp:Panel ID="PanelThongTin" runat="server" Visible="False">
            <div class="div-table" style="width:580px; text-align: center;">
            <div class="div-table-row">
                <div class="div-table-col" style="width:580px; vertical-align: top;">
                    <asp:Image ID="Image_qc" runat="server" Height="200px" Width="200px" />
                </div>
            </div>
            <div class="div-table-row">
                <div class="div-table-col" style="width:580px; vertical-align: top;">
            
                    <table width="100%" align="left">
                        <tr>
                            <td width="180" align="left">
                                Mã:</td>
                            <td width="400" align="left">
                                <asp:Label ID="LabelId" runat="server" Text="Label"></asp:Label></td>
                        </tr>
                        <tr>
                            <td align="left">
                                Href:</td>
                            <td align="left">
                                <asp:TextBox ID="txtHref" runat="server" Width="217px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="left">
                                Ngày bắt đầu:</td>
                            <td align="left">
                                <asp:Calendar ID="Calendar1" runat="server" BackColor="#FFFFCC" 
                                    BorderColor="#FFCC66" BorderWidth="1px" DayNameFormat="Shortest" 
                                    Font-Names="Verdana" Font-Size="8pt" ForeColor="#663399" Height="200px" 
                                    onselectionchanged="Calendar1_SelectionChanged" ShowGridLines="True" 
                                    Width="220px">
                                    <DayHeaderStyle BackColor="#FFCC66" Font-Bold="True" Height="1px" />
                                    <NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC" />
                                    <OtherMonthDayStyle ForeColor="#CC9966" />
                                    <SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
                                    <SelectorStyle BackColor="#FFCC66" />
                                    <TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt" 
                                        ForeColor="#FFFFCC" />
                                    <TodayDayStyle BackColor="#FFCC66" ForeColor="White" />
                                </asp:Calendar>
                                <asp:TextBox ID="txtNgayBD" runat="server" ReadOnly="True"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                Ngày kết thúc:</td>
                            <td align="left">
                                <asp:Calendar ID="Calendar2" runat="server" BackColor="White" 
                                    BorderColor="#3366CC" BorderWidth="1px" CellPadding="1" 
                                    DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" 
                                    ForeColor="#003399" Height="200px" 
                                    onselectionchanged="Calendar2_SelectionChanged" Width="220px">
                                    <DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
                                    <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
                                    <OtherMonthDayStyle ForeColor="#999999" />
                                    <SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                                    <SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
                                    <TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" 
                                        Font-Bold="True" Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" />
                                    <TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
                                    <WeekendDayStyle BackColor="#CCCCFF" />
                                </asp:Calendar>
                                <asp:TextBox ID="txtNgayKT" runat="server" ReadOnly="True"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                Hình ảnh:</td>
                            <td align="left">
                                <asp:FileUpload ID="FileUpload1" runat="server" Width="220px" />
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                                            ControlToValidate="FileUpload1" Display="Dynamic" 
                                            ErrorMessage="Không phải file ảnh" 
                                            ValidationExpression="^([0-9a-zA-Z_\-~ :\\])+(.jpg|.JPG|.jpeg|.JPEG|.bmp|.BMP|.gif|.GIF|.png|.PNG)$"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <asp:Button ID="btnXoa" runat="server" onclick="btnXoa_Click" Text="Xoá" OnClientClick="javascript: return DeleteConfirm();"/>
                            </td>
                            <td align="left">
                                <asp:Button ID="btnCapNhat" runat="server" onclick="btnCapNhat_Click" 
                                    Text="Cập nhật" />
                                <asp:Button ID="btnLMoi" runat="server" onclick="btnLMoi_Click" Text="Lưu" />
                            </td>
                        </tr>
                    </table>
            
                </div>
            </div>
     </div>
        </asp:Panel>
                                <asp:Button ID="btnThem" runat="server" 
            onclick="btnThem_Click" Text="Thêm" />
        <br />

        
    </div>





        <br />
    <asp:GridView ID="GridViewQC" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" CellPadding="4" DataSourceID="ObjectDataSourceQC" 
        ForeColor="#333333" GridLines="None" 
        onselectedindexchanged="GridViewQC_SelectedIndexChanged">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="idQuangCao" HeaderText="idQuangCao" 
                SortExpression="idQuangCao" />
            <asp:BoundField DataField="HREF" HeaderText="HREF" SortExpression="HREF" />
            <asp:BoundField DataField="ngayBD" HeaderText="ngayBD" 
                SortExpression="ngayBD" />
            <asp:BoundField DataField="ngayKT" HeaderText="ngayKT" 
                SortExpression="ngayKT" />
            <asp:CommandField ButtonType="Button" CausesValidation="False" 
                SelectText="Chọn" ShowSelectButton="True" />
        </Columns>
        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
        <SortedAscendingCellStyle BackColor="#FDF5AC" />
        <SortedAscendingHeaderStyle BackColor="#4D0000" />
        <SortedDescendingCellStyle BackColor="#FCF6C0" />
        <SortedDescendingHeaderStyle BackColor="#820000" />
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSourceQC" runat="server" 
        SelectMethod="getListQuangCaoAll" TypeName="Biz_Dal.Biz.BizQuangCao">
    </asp:ObjectDataSource>
</asp:Content>

